function kaoqin(type){
	var msg="";
	if(type=="on"){
		msg="签到";
	}else if(type=="off"){
		msg="签退";
	}
	
	$.post("kaoqin.html", { Action: "post", type: type },  
			function (data, textStatus){         
				if(data=="true"){
					$.messager.show({
						title:'提示',
						msg:msg+'成功',
						timeout:2000,
						showType:'slide'
					});
					setTimeout(function(){window.location.reload();},2000);
				}else{
					$.messager.alert('错误',"今天已经签过到了！",'error');
				}
			} 
		,"text").error(function(XmlHttpRequest,textStatus, errorThrown) {
			alert(XmlHttpRequest.responseText);
		});
}